package com.bawei.login.model

import com.bawei.login.api.LoginApiServer
import com.bawei.login.entity.LoginResultEntity
import okhttp3.RequestBody
import javax.inject.Inject

/**
 * Author: Jason Zhang
 * Date: 2024/8/23
 * Desc: 登录的仓库实体
 */
class LoginRepositoryHilt @Inject constructor(private val apiServer: LoginApiServer) {

    /**
     * 账号登录
     */
    suspend fun loginToServer(body: RequestBody): LoginResultEntity = apiServer.loginToServer(body)

    /**
     * 注册账号
     */
    suspend fun  registerToServer(body: RequestBody): LoginResultEntity = apiServer.registerToServer(body)


}